home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1997-10-07 | 4.8 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Oct 7 02:54:52 1997, modified Tue Oct 7 02:54:52 1997, creator 'MPS ', type ASCII, 4187 bytes "Plunger.c" , at 0x10db 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| dearkID
| deark: macbinary
| default
| |
100%
| lsar
| MacBinary
| default
| |
100%
| librempegprobeID
| NGC (Nintendo DSP Standard) (ngcdspstd)
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 50 6c 75 6e 67 65 | 72 2e 63 00 00 00 00 00 |..Plunge|r.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 10 5b 00 | 00 01 ac b0 5f 8d 3c b0 |......[.|...._.<.|
|00000060| 5f 8d 3c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |_.<.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a6 eb 00 00 |........|........|
|00000080| 0d 23 69 6e 63 6c 75 64 | 65 20 22 50 6c 75 6e 67 |.#includ|e "Plung|
|00000090| 65 72 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 3c |er.h".#i|nclude <|
|000000a0| 4d 65 6d 6f 72 79 2e 68 | 3e 0d 23 69 6e 63 6c 75 |Memory.h|>.#inclu|
|000000b0| 64 65 20 3c 45 72 72 6f | 72 73 2e 68 3e 0d 23 69 |de <Erro|rs.h>.#i|
|000000c0| 6e 63 6c 75 64 65 20 3c | 53 74 72 69 6e 67 2e 68 |nclude <|String.h|
|000000d0| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 50 4c 53 74 |>.#inclu|de <PLSt|
|000000e0| 72 69 6e 67 46 75 6e 63 | 73 2e 68 3e 0d 0d 2f 2a |ringFunc|s.h>../*|
|000000f0| 20 50 6c 75 6e 67 65 72 | 2c 20 72 68 79 6d 65 73 | Plunger|, rhymes|
|00000100| 20 77 69 74 68 20 4d 75 | 6e 67 65 72 2e 0d 09 47 | with Mu|nger...G|
|00000110| 65 6e 65 72 61 6c 20 6d | 65 6d 6f 72 79 20 61 6e |eneral m|emory an|
|00000120| 64 20 73 74 72 69 6e 67 | 20 62 75 66 66 65 72 20 |d string| buffer |
|00000130| 65 64 69 74 69 6e 67 20 | 72 6f 75 74 69 6e 65 73 |editing |routines|
|00000140| 2c 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |, implem|entation|
|00000150| 2e 0d 09 43 6f 70 79 72 | 69 67 68 74 20 28 63 29 |...Copyr|ight (c)|
|00000160| 20 31 39 39 37 20 62 79 | 20 4a 6f 68 6e 20 4d 6f | 1997 by| John Mo|
|00000170| 6e 74 62 72 69 61 6e 64 | 2e 20 20 41 6c 6c 20 52 |ntbriand|. All R|
|00000180| 69 67 68 74 73 20 52 65 | 73 65 72 76 65 64 2e 0d |ights Re|served..|
|00000190| 09 50 65 72 6d 69 73 73 | 69 6f 6e 20 67 72 61 6e |.Permiss|ion gran|
|000001a0| 74 65 64 20 66 6f 72 20 | 70 75 62 6c 69 63 20 75 |ted for |public u|
|000001b0| 73 65 2e 0d 09 44 69 73 | 74 72 69 62 75 74 65 20 |se...Dis|tribute |
|000001c0| 66 72 65 65 6c 79 20 69 | 6e 20 61 72 65 61 73 20 |freely i|n areas |
|000001d0| 77 68 65 72 65 20 74 68 | 65 20 6c 61 77 73 20 6f |where th|e laws o|
|000001e0| 66 20 63 6f 70 79 72 69 | 67 68 74 20 61 70 70 6c |f copyri|ght appl|
|000001f0| 79 2e 0d 09 55 53 45 20 | 41 54 20 59 4f 55 52 20 |y...USE |AT YOUR |
|00000200| 4f 57 4e 20 52 49 53 4b | 2e 0d 09 44 4f 20 4e 4f |OWN RISK|...DO NO|
|00000210| 54 20 44 49 53 54 52 49 | 42 55 54 45 20 4d 4f 44 |T DISTRI|BUTE MOD|
|00000220| 49 46 49 45 44 20 43 4f | 50 49 45 53 2e 0d 09 43 |IFIED CO|PIES...C|
|00000230| 6f 6d 6d 65 6e 74 73 2f | 71 75 65 73 74 69 6f 6e |omments/|question|
|00000240| 73 2f 70 6f 73 74 63 61 | 72 64 73 20 74 6f 20 74 |s/postca|rds to t|
|00000250| 68 65 20 61 75 74 68 6f | 72 20 61 74 20 74 68 65 |he autho|r at the|
|00000260| 20 61 64 64 72 65 73 73 | 3a 0d 09 09 4a 6f 68 6e | address|:...John|
|00000270| 20 4d 6f 6e 74 62 72 69 | 61 6e 64 0d 09 09 50 2e | Montbri|and...P.|
|00000280| 4f 2e 20 42 6f 78 2e 20 | 31 31 33 33 0d 09 09 53 |O. Box. |1133...S|
|00000290| 61 73 6b 61 74 6f 6f 6e | 20 53 61 73 6b 61 74 63 |askatoon| Saskatc|
|000002a0| 68 65 77 61 6e 20 43 61 | 6e 61 64 61 0d 09 09 53 |hewan Ca|nada...S|
|000002b0| 37 4b 20 33 4e 32 0d 09 | 6f 72 20 62 79 20 65 6d |7K 3N2..|or by em|
|000002c0| 61 69 6c 20 61 74 3a 0d | 09 09 74 69 6e 79 6a 6f |ail at:.|..tinyjo|
|000002d0| 68 6e 40 73 6b 2e 73 79 | 6d 70 61 74 69 63 6f 2e |hn@sk.sy|mpatico.|
|000002e0| 63 61 0d 09 49 66 20 79 | 6f 75 20 77 6f 75 6c 64 |ca..If y|ou would|
|000002f0| 20 6c 69 6b 65 20 74 6f | 20 68 61 76 65 3a 0d 09 | like to| have:..|
|00000300| 09 74 65 63 68 6e 69 63 | 61 6c 20 73 75 70 70 6f |.technic|al suppo|
|00000310| 72 74 20 72 65 67 61 72 | 64 69 6e 67 20 74 68 69 |rt regar|ding thi|
|00000320| 73 20 66 69 6c 65 2c 20 | 73 65 6e 64 20 61 20 70 |s file, |send a p|
|00000330| 6f 73 74 63 61 72 64 2e | 0d 09 73 65 65 20 61 6c |ostcard.|..see al|
|00000340| 73 6f 3a 0d 09 09 68 74 | 74 70 3a 2f 2f 77 77 77 |so:...ht|tp://www|
|00000350| 33 2e 73 6b 2e 73 79 6d | 70 61 74 69 63 6f 2e 63 |3.sk.sym|patico.c|
|00000360| 61 2f 74 69 6e 79 6a 6f | 68 6e 0d 2a 2f 0d 0d 0d |a/tinyjo|hn.*/...|
|00000370| 76 6f 69 64 2a 20 6d 65 | 6d 65 64 69 74 28 76 6f |void* me|medit(vo|
|00000380| 69 64 20 2a 62 75 66 66 | 65 72 2c 20 6c 6f 6e 67 |id *buff|er, long|
|00000390| 20 2a 62 75 66 6c 65 6e | 2c 20 63 6f 6e 73 74 20 | *buflen|, const |
|000003a0| 6c 6f 6e 67 20 6f 66 66 | 73 65 74 2c 20 63 6f 6e |long off|set, con|
|000003b0| 73 74 20 6c 6f 6e 67 20 | 63 6f 75 6e 74 2c 20 20 |st long |count, |
|000003c0| 63 6f 6e 73 74 20 76 6f | 69 64 20 2a 6e 65 77 64 |const vo|id *newd|
|000003d0| 61 74 61 2c 20 63 6f 6e | 73 74 20 6c 6f 6e 67 20 |ata, con|st long |
|000003e0| 6e 65 77 6c 65 6e 29 20 | 7b 0d 09 6c 6f 6e 67 20 |newlen) |{..long |
|000003f0| 74 61 69 6c 6c 65 6e 3b | 0d 09 63 68 61 72 20 2a |taillen;|..char *|
|00000400| 77 68 65 72 65 3b 0d 09 | 69 66 20 28 6f 66 66 73 |where;..|if (offs|
|00000410| 65 74 20 3c 20 30 20 7c | 7c 20 63 6f 75 6e 74 20 |et < 0 ||| count |
|00000420| 3c 20 30 20 7c 7c 20 6f | 66 66 73 65 74 20 2b 20 |< 0 || o|ffset + |
|00000430| 63 6f 75 6e 74 20 3e 20 | 2a 62 75 66 6c 65 6e 29 |count > |*buflen)|
|00000440| 20 72 65 74 75 72 6e 20 | 4e 55 4c 4c 3b 0d 09 69 | return |NULL;..i|
|00000450| 66 20 28 28 6e 65 77 6c | 65 6e 20 21 3d 20 30 20 |f ((newl|en != 0 |
|00000460| 26 26 20 6e 65 77 64 61 | 74 61 20 3d 3d 20 4e 55 |&& newda|ta == NU|
|00000470| 4c 4c 29 20 7c 7c 20 6e | 65 77 6c 65 6e 20 3c 20 |LL) || n|ewlen < |
|00000480| 30 29 20 72 65 74 75 72 | 6e 20 4e 55 4c 4c 3b 0d |0) retur|n NULL;.|
|00000490| 09 77 68 65 72 65 20 3d | 20 28 28 63 68 61 72 2a |.where =| ((char*|
|000004a0| 29 20 62 75 66 66 65 72 | 29 20 2b 20 6f 66 66 73 |) buffer|) + offs|
|000004b0| 65 74 3b 0d 09 74 61 69 | 6c 6c 65 6e 20 3d 20 28 |et;..tai|llen = (|
|000004c0| 2a 62 75 66 6c 65 6e 20 | 2d 20 6f 66 66 73 65 74 |*buflen |- offset|
|000004d0| 29 20 2d 20 63 6f 75 6e | 74 3b 0d 09 69 66 20 28 |) - coun|t;..if (|
|000004e0| 74 61 69 6c 6c 65 6e 20 | 3e 20 30 20 26 26 20 63 |taillen |> 0 && c|
|000004f0| 6f 75 6e 74 20 21 3d 20 | 6e 65 77 6c 65 6e 29 0d |ount != |newlen).|
|00000500| 09 09 6d 65 6d 6d 6f 76 | 65 28 77 68 65 72 65 20 |..memmov|e(where |
|00000510| 2b 20 6e 65 77 6c 65 6e | 2c 20 77 68 65 72 65 20 |+ newlen|, where |
|00000520| 2b 20 63 6f 75 6e 74 2c | 20 74 61 69 6c 6c 65 6e |+ count,| taillen|
|00000530| 29 3b 0d 09 69 66 20 28 | 6e 65 77 6c 65 6e 20 21 |);..if (|newlen !|
|00000540| 3d 20 30 29 20 6d 65 6d | 63 70 79 28 77 68 65 72 |= 0) mem|cpy(wher|
|00000550| 65 2c 20 6e 65 77 64 61 | 74 61 2c 20 6e 65 77 6c |e, newda|ta, newl|
|00000560| 65 6e 29 3b 0d 09 2a 62 | 75 66 6c 65 6e 20 3d 20 |en);..*b|uflen = |
|00000570| 2a 62 75 66 6c 65 6e 20 | 2b 20 28 6e 65 77 6c 65 |*buflen |+ (newle|
|00000580| 6e 20 2d 20 63 6f 75 6e | 74 29 3b 0d 09 72 65 74 |n - coun|t);..ret|
|00000590| 75 72 6e 20 62 75 66 66 | 65 72 3b 0d 7d 0d 0d 4f |urn buff|er;.}..O|
|000005a0| 53 45 72 72 20 48 61 6e | 64 6c 65 45 64 69 74 28 |SErr Han|dleEdit(|
|000005b0| 48 61 6e 64 6c 65 20 68 | 2c 20 63 6f 6e 73 74 20 |Handle h|, const |
|000005c0| 6c 6f 6e 67 20 6f 66 66 | 73 65 74 2c 20 63 6f 6e |long off|set, con|
|000005d0| 73 74 20 6c 6f 6e 67 20 | 63 6f 75 6e 74 2c 20 63 |st long |count, c|
|000005e0| 6f 6e 73 74 20 63 68 61 | 72 20 2a 6e 65 77 64 61 |onst cha|r *newda|
|000005f0| 74 61 2c 20 63 6f 6e 73 | 74 20 6c 6f 6e 67 20 6e |ta, cons|t long n|
|00000600| 65 77 63 6f 75 6e 74 29 | 20 7b 0d 09 6c 6f 6e 67 |ewcount)| {..long|
|00000610| 20 74 61 69 6c 6c 65 6e | 2c 20 64 69 66 66 65 72 | taillen|, differ|
|00000620| 65 6e 63 65 2c 20 62 79 | 74 65 63 6f 75 6e 74 3b |ence, by|tecount;|
|00000630| 0d 09 63 68 61 72 20 2a | 77 68 65 72 65 2c 20 73 |..char *|where, s|
|00000640| 74 61 74 65 3b 0d 09 4f | 53 45 72 72 20 65 72 72 |tate;..O|SErr err|
|00000650| 3b 0d 09 62 79 74 65 63 | 6f 75 6e 74 20 3d 20 47 |;..bytec|ount = G|
|00000660| 65 74 48 61 6e 64 6c 65 | 53 69 7a 65 28 68 29 3b |etHandle|Size(h);|
|00000670| 0d 09 69 66 20 28 28 65 | 72 72 20 3d 20 4d 65 6d |..if ((e|rr = Mem|
|00000680| 45 72 72 6f 72 28 29 29 | 20 21 3d 20 6e 6f 45 72 |Error())| != noEr|
|00000690| 72 29 20 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 09 |r) retur|n err;..|
|000006a0| 69 66 20 28 6f 66 66 73 | 65 74 20 3c 20 30 20 7c |if (offs|et < 0 ||
|000006b0| 7c 20 63 6f 75 6e 74 20 | 3c 20 30 20 7c 7c 20 6f || count |< 0 || o|
|000006c0| 66 66 73 65 74 20 2b 20 | 63 6f 75 6e 74 20 3e 20 |ffset + |count > |
|000006d0| 62 79 74 65 63 6f 75 6e | 74 29 20 72 65 74 75 72 |bytecoun|t) retur|
|000006e0| 6e 20 70 61 72 61 6d 45 | 72 72 3b 0d 09 69 66 20 |n paramE|rr;..if |
|000006f0| 28 28 6e 65 77 63 6f 75 | 6e 74 20 21 3d 20 30 20 |((newcou|nt != 0 |
|00000700| 26 26 20 6e 65 77 64 61 | 74 61 20 3d 3d 20 4e 55 |&& newda|ta == NU|
|00000710| 4c 4c 29 20 7c 7c 20 6e | 65 77 63 6f 75 6e 74 20 |LL) || n|ewcount |
|00000720| 3c 20 30 29 20 72 65 74 | 75 72 6e 20 70 61 72 61 |< 0) ret|urn para|
|00000730| 6d 45 72 72 3b 0d 09 64 | 69 66 66 65 72 65 6e 63 |mErr;..d|ifferenc|
|00000740| 65 20 3d 20 6e 65 77 63 | 6f 75 6e 74 20 2d 20 63 |e = newc|ount - c|
|00000750| 6f 75 6e 74 3b 0d 09 69 | 66 20 28 64 69 66 66 65 |ount;..i|f (diffe|
|00000760| 72 65 6e 63 65 20 3e 20 | 30 29 20 7b 0d 09 09 53 |rence > |0) {...S|
|00000770| 65 74 48 61 6e 64 6c 65 | 53 69 7a 65 28 68 2c 20 |etHandle|Size(h, |
|00000780| 62 79 74 65 63 6f 75 6e | 74 20 2b 20 64 69 66 66 |bytecoun|t + diff|
|00000790| 65 72 65 6e 63 65 29 3b | 0d 09 09 69 66 20 28 28 |erence);|...if ((|
|000007a0| 65 72 72 20 3d 20 4d 65 | 6d 45 72 72 6f 72 28 29 |err = Me|mError()|
|000007b0| 29 20 21 3d 20 6e 6f 45 | 72 72 29 20 72 65 74 75 |) != noE|rr) retu|
|000007c0| 72 6e 20 65 72 72 3b 0d | 09 7d 0d 09 73 74 61 74 |rn err;.|.}..stat|
|000007d0| 65 20 3d 20 48 47 65 74 | 53 74 61 74 65 28 68 29 |e = HGet|State(h)|
|000007e0| 3b 0d 09 48 4c 6f 63 6b | 28 68 29 3b 0d 09 77 68 |;..HLock|(h);..wh|
|000007f0| 65 72 65 20 3d 20 28 28 | 63 68 61 72 2a 29 28 2a |ere = ((|char*)(*|
|00000800| 68 29 29 20 2b 20 6f 66 | 66 73 65 74 3b 0d 09 74 |h)) + of|fset;..t|
|00000810| 61 69 6c 6c 65 6e 20 3d | 20 28 62 79 74 65 63 6f |aillen =| (byteco|
|00000820| 75 6e 74 20 2d 20 6f 66 | 66 73 65 74 29 20 2d 20 |unt - of|fset) - |
|00000830| 63 6f 75 6e 74 3b 0d 09 | 69 66 20 28 74 61 69 6c |count;..|if (tail|
|00000840| 6c 65 6e 20 3e 20 30 20 | 26 26 20 63 6f 75 6e 74 |len > 0 |&& count|
|00000850| 20 21 3d 20 6e 65 77 63 | 6f 75 6e 74 29 20 6d 65 | != newc|ount) me|
|00000860| 6d 6d 6f 76 65 28 77 68 | 65 72 65 20 2b 20 6e 65 |mmove(wh|ere + ne|
|00000870| 77 63 6f 75 6e 74 2c 20 | 77 68 65 72 65 20 2b 20 |wcount, |where + |
|00000880| 63 6f 75 6e 74 2c 20 74 | 61 69 6c 6c 65 6e 29 3b |count, t|aillen);|
|00000890| 0d 09 69 66 20 28 6e 65 | 77 63 6f 75 6e 74 20 21 |..if (ne|wcount !|
|000008a0| 3d 20 30 29 20 6d 65 6d | 63 70 79 28 77 68 65 72 |= 0) mem|cpy(wher|
|000008b0| 65 2c 20 6e 65 77 64 61 | 74 61 2c 20 6e 65 77 63 |e, newda|ta, newc|
|000008c0| 6f 75 6e 74 29 3b 0d 09 | 48 53 65 74 53 74 61 74 |ount);..|HSetStat|
|000008d0| 65 28 68 2c 20 73 74 61 | 74 65 29 3b 0d 09 69 66 |e(h, sta|te);..if|
|000008e0| 20 28 64 69 66 66 65 72 | 65 6e 63 65 20 3c 20 30 | (differ|ence < 0|
|000008f0| 29 20 7b 0d 09 09 53 65 | 74 48 61 6e 64 6c 65 53 |) {...Se|tHandleS|
|00000900| 69 7a 65 28 68 2c 20 62 | 79 74 65 63 6f 75 6e 74 |ize(h, b|ytecount|
|00000910| 20 2b 20 64 69 66 66 65 | 72 65 6e 63 65 29 3b 0d | + diffe|rence);.|
|00000920| 09 09 69 66 20 28 28 65 | 72 72 20 3d 20 4d 65 6d |..if ((e|rr = Mem|
|00000930| 45 72 72 6f 72 28 29 29 | 20 21 3d 20 6e 6f 45 72 |Error())| != noEr|
|00000940| 72 29 20 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 09 |r) retur|n err;..|
|00000950| 7d 0d 09 72 65 74 75 72 | 6e 20 6e 6f 45 72 72 3b |}..retur|n noErr;|
|00000960| 0d 7d 0d 0d 0d 53 74 72 | 69 6e 67 50 74 72 20 50 |.}...Str|ingPtr P|
|00000970| 4c 73 74 72 65 64 69 74 | 28 53 74 72 69 6e 67 50 |Lstredit|(StringP|
|00000980| 74 72 20 64 73 74 2c 20 | 73 68 6f 72 74 20 69 6e |tr dst, |short in|
|00000990| 64 65 78 2c 20 73 68 6f | 72 74 20 6f 6c 64 6c 65 |dex, sho|rt oldle|
|000009a0| 6e 2c 20 63 6f 6e 73 74 | 20 76 6f 69 64 2a 20 6e |n, const| void* n|
|000009b0| 65 77 64 61 74 61 2c 20 | 73 68 6f 72 74 20 6e 65 |ewdata, |short ne|
|000009c0| 77 6c 65 6e 29 20 7b 0d | 09 73 68 6f 72 74 20 74 |wlen) {.|.short t|
|000009d0| 61 69 6c 6c 65 6e 2c 20 | 6e 65 77 73 69 7a 65 2c |aillen, |newsize,|
|000009e0| 20 6f 72 69 67 69 6e 61 | 6c 73 69 7a 65 3b 0d 09 | origina|lsize;..|
|000009f0| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 2a 77 |unsigned| char *w|
|00000a00| 68 65 72 65 3b 0d 09 6f | 72 69 67 69 6e 61 6c 73 |here;..o|riginals|
|00000a10| 69 7a 65 20 3d 20 64 73 | 74 5b 30 5d 3b 0d 09 6e |ize = ds|t[0];..n|
|00000a20| 65 77 73 69 7a 65 20 3d | 20 6e 65 77 6c 65 6e 20 |ewsize =| newlen |
|00000a30| 2d 20 6f 6c 64 6c 65 6e | 20 2b 20 6f 72 69 67 69 |- oldlen| + origi|
|00000a40| 6e 61 6c 73 69 7a 65 3b | 0d 09 69 66 20 28 6e 65 |nalsize;|..if (ne|
|00000a50| 77 6c 65 6e 20 3e 20 6f | 6c 64 6c 65 6e 20 26 26 |wlen > o|ldlen &&|
|00000a60| 20 6e 65 77 73 69 7a 65 | 20 3e 20 32 35 35 29 20 | newsize| > 255) |
|00000a70| 72 65 74 75 72 6e 20 4e | 55 4c 4c 3b 0d 09 69 66 |return N|ULL;..if|
|00000a80| 20 28 69 6e 64 65 78 20 | 3c 20 31 20 7c 7c 20 28 | (index |< 1 || (|
|00000a90| 69 6e 64 65 78 2b 6f 6c | 64 6c 65 6e 29 20 3e 20 |index+ol|dlen) > |
|00000aa0| 20 6f 72 69 67 69 6e 61 | 6c 73 69 7a 65 2b 31 29 | origina|lsize+1)|
|00000ab0| 20 72 65 74 75 72 6e 20 | 4e 55 4c 4c 3b 0d 09 77 | return |NULL;..w|
|00000ac0| 68 65 72 65 20 3d 20 64 | 73 74 20 2b 20 69 6e 64 |here = d|st + ind|
|00000ad0| 65 78 3b 0d 09 74 61 69 | 6c 6c 65 6e 20 3d 20 6f |ex;..tai|llen = o|
|00000ae0| 72 69 67 69 6e 61 6c 73 | 69 7a 65 20 2d 20 69 6e |riginals|ize - in|
|00000af0| 64 65 78 20 2b 20 31 20 | 2d 20 6f 6c 64 6c 65 6e |dex + 1 |- oldlen|
|00000b00| 3b 0d 09 69 66 20 28 74 | 61 69 6c 6c 65 6e 20 3e |;..if (t|aillen >|
|00000b10| 20 30 20 26 26 20 6f 6c | 64 6c 65 6e 20 21 3d 20 | 0 && ol|dlen != |
|00000b20| 6e 65 77 6c 65 6e 29 0d | 09 09 6d 65 6d 6d 6f 76 |newlen).|..memmov|
|00000b30| 65 28 77 68 65 72 65 20 | 2b 20 6e 65 77 6c 65 6e |e(where |+ newlen|
|00000b40| 2c 20 77 68 65 72 65 20 | 2b 20 6f 6c 64 6c 65 6e |, where |+ oldlen|
|00000b50| 2c 20 74 61 69 6c 6c 65 | 6e 29 3b 0d 09 69 66 20 |, taille|n);..if |
|00000b60| 28 6e 65 77 6c 65 6e 20 | 21 3d 20 30 29 20 6d 65 |(newlen |!= 0) me|
|00000b70| 6d 63 70 79 28 77 68 65 | 72 65 2c 20 6e 65 77 64 |mcpy(whe|re, newd|
|00000b80| 61 74 61 2c 20 6e 65 77 | 6c 65 6e 29 3b 0d 09 64 |ata, new|len);..d|
|00000b90| 73 74 5b 30 5d 20 3d 20 | 6e 65 77 73 69 7a 65 3b |st[0] = |newsize;|
|00000ba0| 0d 09 72 65 74 75 72 6e | 20 64 73 74 3b 0d 7d 0d |..return| dst;.}.|
|00000bb0| 0d 53 74 72 69 6e 67 50 | 74 72 20 50 4c 73 74 72 |.StringP|tr PLstr|
|00000bc0| 72 65 70 6c 61 63 65 28 | 53 74 72 69 6e 67 50 74 |replace(|StringPt|
|00000bd0| 72 20 64 73 74 2c 20 63 | 6f 6e 73 74 20 53 74 72 |r dst, c|onst Str|
|00000be0| 69 6e 67 50 74 72 20 70 | 61 74 74 65 72 6e 2c 20 |ingPtr p|attern, |
|00000bf0| 63 6f 6e 73 74 20 53 74 | 72 69 6e 67 50 74 72 20 |const St|ringPtr |
|00000c00| 6e 65 77 70 61 74 74 65 | 72 6e 29 20 7b 0d 09 73 |newpatte|rn) {..s|
|00000c10| 68 6f 72 74 20 77 68 65 | 72 65 3b 0d 09 69 66 20 |hort whe|re;..if |
|00000c20| 28 28 77 68 65 72 65 20 | 3d 20 50 4c 70 6f 73 28 |((where |= PLpos(|
|00000c30| 70 61 74 74 65 72 6e 2c | 20 64 73 74 29 29 20 21 |pattern,| dst)) !|
|00000c40| 3d 20 30 29 20 7b 0d 09 | 09 72 65 74 75 72 6e 20 |= 0) {..|.return |
|00000c50| 50 4c 73 74 72 65 64 69 | 74 28 64 73 74 2c 20 77 |PLstredi|t(dst, w|
|00000c60| 68 65 72 65 2c 20 70 61 | 74 74 65 72 6e 5b 30 5d |here, pa|ttern[0]|
|00000c70| 2c 20 6e 65 77 70 61 74 | 74 65 72 6e 2b 31 2c 20 |, newpat|tern+1, |
|00000c80| 6e 65 77 70 61 74 74 65 | 72 6e 5b 30 5d 29 3b 0d |newpatte|rn[0]);.|
|00000c90| 09 7d 20 65 6c 73 65 20 | 72 65 74 75 72 6e 20 4e |.} else |return N|
|00000ca0| 55 4c 4c 3b 0d 7d 0d 0d | 53 74 72 69 6e 67 50 74 |ULL;.}..|StringPt|
|00000cb0| 72 20 50 4c 73 74 72 69 | 6e 73 65 72 74 28 53 74 |r PLstri|nsert(St|
|00000cc0| 72 69 6e 67 50 74 72 20 | 64 73 74 2c 20 63 6f 6e |ringPtr |dst, con|
|00000cd0| 73 74 20 6c 6f 6e 67 20 | 69 6e 64 65 78 2c 20 53 |st long |index, S|
|00000ce0| 74 72 69 6e 67 50 74 72 | 20 73 72 63 29 20 7b 0d |tringPtr| src) {.|
|00000cf0| 09 72 65 74 75 72 6e 20 | 50 4c 73 74 72 65 64 69 |.return |PLstredi|
|00000d00| 74 28 64 73 74 2c 20 69 | 6e 64 65 78 2c 20 30 2c |t(dst, i|ndex, 0,|
|00000d10| 20 73 72 63 2b 31 2c 20 | 73 72 63 5b 30 5d 29 3b | src+1, |src[0]);|
|00000d20| 0d 7d 0d 0d 53 74 72 69 | 6e 67 50 74 72 20 50 4c |.}..Stri|ngPtr PL|
|00000d30| 73 74 72 64 65 6c 65 74 | 65 28 53 74 72 69 6e 67 |strdelet|e(String|
|00000d40| 50 74 72 20 64 73 74 2c | 20 63 6f 6e 73 74 20 73 |Ptr dst,| const s|
|00000d50| 68 6f 72 74 20 69 6e 64 | 65 78 2c 20 63 6f 6e 73 |hort ind|ex, cons|
|00000d60| 74 20 73 68 6f 72 74 20 | 63 6f 75 6e 74 29 20 7b |t short |count) {|
|00000d70| 0d 09 72 65 74 75 72 6e | 20 50 4c 73 74 72 65 64 |..return| PLstred|
|00000d80| 69 74 28 64 73 74 2c 20 | 69 6e 64 65 78 2c 20 63 |it(dst, |index, c|
|00000d90| 6f 75 6e 74 2c 20 4e 55 | 4c 4c 2c 20 30 29 3b 0d |ount, NU|LL, 0);.|
|00000da0| 7d 0d 0d 0d 63 68 61 72 | 2a 20 73 74 72 65 64 69 |}...char|* stredi|
|00000db0| 74 28 63 68 61 72 2a 20 | 64 73 74 2c 20 63 6f 6e |t(char* |dst, con|
|00000dc0| 73 74 20 6c 6f 6e 67 20 | 6f 66 66 73 65 74 2c 20 |st long |offset, |
|00000dd0| 63 6f 6e 73 74 20 6c 6f | 6e 67 20 6f 6c 64 6c 65 |const lo|ng oldle|
|00000de0| 6e 2c 20 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 6e |n, const| char *n|
|00000df0| 65 77 64 61 74 61 2c 20 | 63 6f 6e 73 74 20 6c 6f |ewdata, |const lo|
|00000e00| 6e 67 20 6e 65 77 6c 65 | 6e 29 20 7b 0d 09 6c 6f |ng newle|n) {..lo|
|00000e10| 6e 67 20 74 61 69 6c 6c | 65 6e 3b 0d 09 63 68 61 |ng taill|en;..cha|
|00000e20| 72 20 2a 77 68 65 72 65 | 3b 0d 09 77 68 65 72 65 |r *where|;..where|
|00000e30| 20 3d 20 64 73 74 20 2b | 20 6f 66 66 73 65 74 3b | = dst +| offset;|
|00000e40| 0d 09 74 61 69 6c 6c 65 | 6e 20 3d 20 73 74 72 6c |..taille|n = strl|
|00000e50| 65 6e 28 77 68 65 72 65 | 29 20 2d 20 6f 6c 64 6c |en(where|) - oldl|
|00000e60| 65 6e 20 2b 20 31 3b 0d | 09 69 66 20 28 74 61 69 |en + 1;.|.if (tai|
|00000e70| 6c 6c 65 6e 20 3e 20 30 | 20 26 26 20 6f 6c 64 6c |llen > 0| && oldl|
|00000e80| 65 6e 20 21 3d 20 6e 65 | 77 6c 65 6e 29 0d 09 09 |en != ne|wlen)...|
|00000e90| 6d 65 6d 6d 6f 76 65 28 | 77 68 65 72 65 20 2b 20 |memmove(|where + |
|00000ea0| 6e 65 77 6c 65 6e 2c 20 | 77 68 65 72 65 20 2b 20 |newlen, |where + |
|00000eb0| 6f 6c 64 6c 65 6e 2c 20 | 74 61 69 6c 6c 65 6e 29 |oldlen, |taillen)|
|00000ec0| 3b 0d 09 69 66 20 28 6e | 65 77 6c 65 6e 20 21 3d |;..if (n|ewlen !=|
|00000ed0| 20 30 29 20 6d 65 6d 63 | 70 79 28 77 68 65 72 65 | 0) memc|py(where|
|00000ee0| 2c 20 6e 65 77 64 61 74 | 61 2c 20 6e 65 77 6c 65 |, newdat|a, newle|
|00000ef0| 6e 29 3b 0d 09 72 65 74 | 75 72 6e 20 64 73 74 3b |n);..ret|urn dst;|
|00000f00| 0d 7d 0d 0d 63 68 61 72 | 2a 20 73 74 72 72 65 70 |.}..char|* strrep|
|00000f10| 6c 61 63 65 28 63 68 61 | 72 2a 20 64 73 74 2c 20 |lace(cha|r* dst, |
|00000f20| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 70 61 74 74 |const ch|ar *patt|
|00000f30| 65 72 6e 2c 20 63 6f 6e | 73 74 20 63 68 61 72 20 |ern, con|st char |
|00000f40| 2a 6e 65 77 70 61 74 74 | 65 72 6e 29 20 7b 0d 09 |*newpatt|ern) {..|
|00000f50| 63 68 61 72 20 2a 77 68 | 65 72 65 3b 0d 09 69 66 |char *wh|ere;..if|
|00000f60| 20 28 28 77 68 65 72 65 | 20 3d 20 73 74 72 73 74 | ((where| = strst|
|00000f70| 72 28 64 73 74 2c 20 70 | 61 74 74 65 72 6e 29 29 |r(dst, p|attern))|
|00000f80| 20 21 3d 20 4e 55 4c 4c | 29 20 7b 0d 09 09 73 74 | != NULL|) {...st|
|00000f90| 72 65 64 69 74 28 77 68 | 65 72 65 2c 20 30 2c 20 |redit(wh|ere, 0, |
|00000fa0| 73 74 72 6c 65 6e 28 70 | 61 74 74 65 72 6e 29 2c |strlen(p|attern),|
|00000fb0| 20 6e 65 77 70 61 74 74 | 65 72 6e 2c 20 73 74 72 | newpatt|ern, str|
|00000fc0| 6c 65 6e 28 6e 65 77 70 | 61 74 74 65 72 6e 29 29 |len(newp|attern))|
|00000fd0| 3b 0d 09 09 72 65 74 75 | 72 6e 20 64 73 74 3b 0d |;...retu|rn dst;.|
|00000fe0| 09 7d 20 65 6c 73 65 20 | 72 65 74 75 72 6e 20 4e |.} else |return N|
|00000ff0| 55 4c 4c 3b 0d 7d 0d 0d | 63 68 61 72 2a 20 73 74 |ULL;.}..|char* st|
|00001000| 72 69 6e 73 65 72 74 28 | 63 68 61 72 2a 20 64 73 |rinsert(|char* ds|
|00001010| 74 2c 20 63 6f 6e 73 74 | 20 6c 6f 6e 67 20 6f 66 |t, const| long of|
|00001020| 66 73 65 74 2c 20 63 68 | 61 72 2a 20 73 72 63 29 |fset, ch|ar* src)|
|00001030| 20 7b 0d 09 72 65 74 75 | 72 6e 20 73 74 72 65 64 | {..retu|rn stred|
|00001040| 69 74 28 64 73 74 2c 20 | 6f 66 66 73 65 74 2c 20 |it(dst, |offset, |
|00001050| 30 2c 20 73 72 63 2c 20 | 73 74 72 6c 65 6e 28 73 |0, src, |strlen(s|
|00001060| 72 63 29 29 3b 0d 7d 0d | 0d 63 68 61 72 2a 20 73 |rc));.}.|.char* s|
|00001070| 74 72 64 65 6c 65 74 65 | 28 63 68 61 72 2a 20 64 |trdelete|(char* d|
|00001080| 73 74 2c 20 63 6f 6e 73 | 74 20 6c 6f 6e 67 20 6f |st, cons|t long o|
|00001090| 66 66 73 65 74 2c 20 63 | 6f 6e 73 74 20 6c 6f 6e |ffset, c|onst lon|
|000010a0| 67 20 63 6f 75 6e 74 29 | 20 7b 0d 09 72 65 74 75 |g count)| {..retu|
|000010b0| 72 6e 20 73 74 72 65 64 | 69 74 28 64 73 74 2c 20 |rn stred|it(dst, |
|000010c0| 6f 66 66 73 65 74 2c 20 | 63 6f 75 6e 74 2c 20 4e |offset, |count, N|
|000010d0| 55 4c 4c 2c 20 30 29 3b | 0d 7d 0d 00 00 00 00 00 |ULL, 0);|.}......|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001110| 04 a9 6f 04 60 00 02 86 | 61 00 06 70 61 02 4e 75 |..o.`...|a..pa.Nu|
|00001120| 30 2e 03 c0 61 00 05 b2 | 30 28 00 16 32 00 61 00 |0...a...|0(..2.a.|
|00001130| 09 50 6c 75 6e 67 65 72 | 2e 63 02 00 00 00 54 45 |.Plunger|.c....TE|
|00001140| 58 54 4d 50 53 20 01 00 | 00 00 00 41 00 00 00 00 |XTMPS ..|...A....|
|00001150| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 41 |..TEXTMP|S .....A|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 0e 2c b0 1a 1c 3f 00 00 | 10 5b 00 00 01 ac 61 00 |.,...?..|.[....a.|
|00001180| 06 06 61 9c 4e 75 61 00 | 29 86 30 2e 03 be 44 40 |..a.Nua.|).0...D@|
|00001190| b0 78 02 14 66 10 20 2e | 03 c2 b0 b8 03 98 66 06 |.x..f. .|......f.|
|000011a0| 61 00 07 8c 4e 75 3d 78 | 02 14 03 22 61 00 05 8c |a...Nu=x|..."a...|
|000011b0| 61 00 03 52 4e 75 4a 2e | 04 a6 67 38 32 00 30 2c |a..RNuJ.|..g82.0,|
|000011c0| 00 06 2e 2c 00 08 4a 41 | 66 0c b0 6e 03 be 66 06 |...,..JA|f..n..f.|
|000011d0| be ae 03 c2 67 08 61 00 | 05 58 61 00 03 28 41 ec |....g.a.|.Xa..(A.|
|000011e0| 00 0c 10 10 67 0e 0c 00 | 00 1f 6e 08 30 2c 00 4c |....g...|..n.0,.L|
|000011f0| 61 00 1d b4 4e 75 55 4f | 2f 2e 03 ee 2f 2e 04 de |a...NuUO|/.../...|
|00001200| 00 00 00 48 00 09 47 65 | 6e 65 76 61 00 69 6e 64 |...H..Ge|neva.ind|
|00001210| 03 df 89 20 73 68 6f 72 | 74 20 6f 6c 64 6c 65 6e |... shor|t oldlen|
|00001220| 2c 20 63 6f 6e 73 00 03 | 00 08 00 b2 01 2b 02 c9 |, cons..|.....+..|
|00001230| 03 83 00 b2 01 2b 02 c9 | 03 83 b0 5f 54 fc 00 00 |.....+..|..._T...|
|00001240| 02 eb 00 00 02 eb 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|00001250| 00 b2 01 2b 02 c9 03 83 | 00 b2 01 2b 02 c9 03 83 |...+....|...+....|
|00001260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 03 d6 |.....n..|.n...>..|
|00001280| 71 38 26 32 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |q8&2....|.>..MPSR|
|00001290| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000012a0| 03 f0 ff ff 00 00 00 4c | 03 d7 cc 4c 00 00 00 00 |.......L|...L....|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+